import request from '@/utils/request'
import store from '../store'
import axios from 'axios'
import qs from 'qs'
//  const userid = store.getters.userid
const prefix = '/zcmtask'
const liveprefix = '/live'
const systemprefix = '/uums'
const url = 'http://172.10.103.30:8081'
const baseUrl = 'https://bigdata.ccmapp.cn/pg'
// https://bigdata.ccmapp.cn/pg
// http://210.73.217.81:21000

/* ----- 新闻编辑 begin -----*/

/* ----- 新闻编辑 end -----*/

/** 关注问题表（我关注的问题）接口开始 **/
//  问答话题app问答已关注问题列表查询接口
export function topquesList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/QaAtt/topquesList',
    method: 'post',
    data: postselectinfo
  })
}
//  新增类别接口
export function topicList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/topic/select',
    method: 'post',
    data: postselectinfo
  })
}
//  问答话题app问答问题关注接口
export function addttention(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/QaAtt/addttention',
    method: 'post',
    data: postselectinfo
  })
}
/** 关注问题表（我关注的问题）接口结束 **/

/** 问题与文章问题表 接口开始 **/
//  问题与文章话题对应问题列表接口
export function topQuestionList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/topQuestionList',
    method: 'post',
    data: postselectinfo
  })
}
//  问题与文章所有有效话题列表（无权限）接口
export function topList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/topList',
    method: 'post',
    data: postselectinfo
  })
}
//  列表查询接口
export function queyList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/queyList',
    method: 'post',
    data: postselectinfo
  })
}
//  问题与文章我的发问查询列表接口
export function questList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/questList',
    method: 'post',
    data: postselectinfo
  })
}
//  问题与文章修改接口
export function exitQuestion(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/exitQuestions/' + postselectinfo.id,
    method: 'post',
    data: postselectinfo
  })
}
//  问题与文章详情查询接口
export function details(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/details',
    method: 'post',
    data: postselectinfo
  })
}
//  问答热点详情接口
export function anQuestion(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/anQuestion',
    method: 'post',
    data: postselectinfo
  })
}
//  问答热点列表接口
export function anQList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/anQList',
    method: 'post',
    data: postselectinfo
  })
}
//  问题与文章新增接口
export function addQuest(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/addQuest',
    method: 'post',
    data: postselectinfo
  })
}
/** 问题与文章问题表 接口结束 **/

/** 问题与文章回答表 接口开始 **/
//  我的回复查询列表接口
export function answerList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/QaAns/answerList',
    method: 'post',
    data: postselectinfo
  })
}
//  回复接口
export function addCont(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/question/QaAns/addCont',
    method: 'post',
    data: postselectinfo
  })
}
/** 问题与文章回答表 接口结束 **/

/** 问题类别表 接口开始 **/
//  更新接口
export function classify(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/classify/',
    method: 'put',
    data: postselectinfo
  })
}
//  更新类别接口
export function updateClassify(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/classify/updateClassify',
    method: 'post',
    data: postselectinfo
  })
}
//  检索接口
export function select(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/classify/select',
    method: 'post',
    data: postselectinfo
  })
}
//  新增类别接口
export function saveClassify(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/classify/saveClassify',
    method: 'post',
    data: postselectinfo
  })
}
//  批量强制删除接口
export function forceBatch(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/classify/force/batch',
    method: 'delete',
    data: postselectinfo
  })
}
//  强制删除接口
export function force(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/classify/force',
    method: 'delete',
    data: postselectinfo
  })
}

/** 稿件管理 接口开始 **/
// 获取已发布稿件列表信息
export function queryPublicedList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/product/queryPublicedList',
    method: 'post',
    data: postselectinfo
  })
}

// 获取成品稿件维护列表
export function queryArticleList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/product/queryArticleList',
    // , + postselectinfo.articleid,
    method: 'post',
    data: postselectinfo
  })
}
// 获取稿件维护详细信息
export function queryArticle(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/nrsh/queryArticle/' + postselectinfo.articleid,
    method: 'post',
    data: postselectinfo
  })
}
// 获取成品稿件维护删除
export function deleteArticleByArticleId(postselectinfo) {
  return request({
    url: process.env.PREFIX + '/zcm/oneKeyDeleteArticle/deleteArticleByArticleId/' + postselectinfo.id,

    method: 'get',
    data: postselectinfo
  })
}
// 一键删除列表信息
export function queryOneKeyDeleteList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/oneKeyDeleteArticle/queryOneKeyDeleteList',
    method: 'post',
    data: postselectinfo
  })
}
// 一键删除
export function deleteAllArticle(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/oneKeyDeleteArticle/deleteAllArticle/' + postselectinfo.id,
    method: 'get',
    data: postselectinfo
  })
}
// 稿件置顶
export function setStickyArticle(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/product/setStickyArticle/' + postselectinfo.categoryProductId + '/' + postselectinfo.sticky,
    method: 'get',
    data: postselectinfo
  })
}
// 热门稿件
export function setStickyArticleHot(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/product/setHotArticle/' + postselectinfo.categoryProductId + '/' + postselectinfo.hot,
    method: 'get',
    data: postselectinfo
  })
}
// 今日学习
export function studyToday(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/product/setStudyArticle/' + postselectinfo.categoryProductId + '/' + postselectinfo.isStudy,
    method: 'get',
    data: postselectinfo
  })
}

/** 稿件管理 接口结束 **/

/*
 * 直播接口start
 * */
// 创建直播通道
export function channel(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/live/channel',
    method: 'post',
    data: postselectinfo
  })
}
/*
 * 获取地理位置
 * */
export function tregionSelectList(postselectinfo) {
  return request({
    url: liveprefix + '/TRegion/selectList',
    method: 'post',
    data: postselectinfo
  })
}
// 删除
export function liveDeleteList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activity/delete/' + postselectinfo.id,
    method: 'post',
    data: postselectinfo
  })
}
// 活动检索
export function liveselect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activity/select',
    method: 'post',
    data: postselectinfo
  })
}
// 添加直播活动
export function liveinsert(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activity/insert',
    method: 'post',
    data: postselectinfo
  })
}
// 直播信息详情
export function livedetail(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activity/detail/' + postselectinfo.id,
    method: 'post',
    data: postselectinfo
  })
}
// 直播审批
export function livereview(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activityReview/review',
    method: 'post',
    data: postselectinfo
  })
}
// 直播发布
export function livepublish(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activity/publish/' + postselectinfo.id,
    method: 'post',
    data: postselectinfo
  })
}
// 直播更新
export function liveupdate(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/activity/update/' + postselectinfo.activityId,
    method: 'post',
    data: postselectinfo
  })
}
// 直播通道列表
export function tdselect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/live/channel/select',
    method: 'post',
    data: postselectinfo
  })
}
// 互动审核检索
export function selectChatroomList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/chatroom/selectChatroomList',
    method: 'post',
    data: postselectinfo
  })
}
// 互动审核发布
export function selectChatroomupdate(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/chatroom/update',
    method: 'post',
    data: postselectinfo
  })
}
// 互动审核删除
export function selectChatroomDelete(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/chatroom/batchDelete',
    method: 'post',
    data: postselectinfo
  })
}
// 图文发布
export function selectChatroomadd(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm' + '/TImageTextLive/add',
    method: 'post',
    data: postselectinfo
  })
}
// 通道发布
export function publicLive(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/live/channel/publicLive/' + postselectinfo.channelId,
    method: 'post',
    data: postselectinfo
  })
}
// 通道停止
export function stopLive(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/live/channel/stopLive/' + postselectinfo.channelId,
    method: 'post',
    data: postselectinfo
  })
}
// 查询人员
export function selectUserLive(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/chatroom/selectUser',
    method: 'post',
    headers: {
      'Authorization': 'Bearer' + store.getters.token
    },
    data: postselectinfo
  })
}
// 停止活动
export function stopActivity(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/live/channel/stopActivity/' + postselectinfo.activityId,
    method: 'post',
    data: postselectinfo
  })
}
// 直播详情
export function findLiveDetail(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/live/channel/findLiveDetail/' + postselectinfo.activityId,
    method: 'post',
    data: postselectinfo
  })
}
// 图文
export function imageTextLiveSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: liveprefix + '/zcm/TImageTextLive/imageTextLiveSelect',
    method: 'post',
    data: postselectinfo
  })
}
/*
 * 直播接口end
 * */
/*
 * 系统管理 start
 * */
// 系统企业检索
export function departmentSelect(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysDeptInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 系统企业获取树形结构
export function departmentTree(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysDeptInfo/tree',
    method: 'post',
    data: postselectinfo
  })
}
// 菜单信息获取
export function menuTree(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysPrivilegeInfo/select/tree',
    method: 'post',
    data: postselectinfo
  })
}
// 菜单拖拽
export function menuDrag(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysPrivilegeInfo/menuDrag',
    method: 'post',
    data: postselectinfo
  })
}
// 菜单信息检索
export function menuTreeSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysPrivilegeInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 菜单插入
export function menuaddTree(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysPrivilegeInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 子系统检索
export function subsysSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysSubsystemInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 菜单删除
export function menuDelete(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysPrivilegeInfo/force',
    method: 'DELETE',
    data: postselectinfo
  })
}
// 菜单更新
export function menuUpdate(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysPrivilegeInfo/' + postselectinfo.id,
    method: 'put',
    data: postselectinfo
  })
}
// 码表
export function getCodeList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo/select?' + 'dataMeta=' + postselectinfo.dataMeta,
    method: 'POST',
    data: postselectinfo
  })
}
// 查询系统码表缓存
export function getCodeListFromCacheByType(args) {
  return request({
    url: uumsPrefix + '/FreeCertification/SysCodeCommon/getSysCodeList?codeType=' + args.codeType + '&codeStatus=' + args.codeStatus,
    method: 'POST',
    data: args
  })
}

// 子系统检索
export function snbsysSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysSubsystemInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 子系统插入
export function snbsysInsert(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysSubsystemInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 子系统删除
export function snbsysDelete(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysSubsystemInfo/force',
    method: 'DELETE',
    data: postselectinfo
  })
}
// 子系统更新
export function snbsysUpdate(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysSubsystemInfo/' + postselectinfo.id,
    method: 'PUT',
    data: postselectinfo
  })
}
// 系统组织机构树
export function orgTree(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  postselectinfo.status = '0,1'
  return request({
    url: systemprefix + '/SysOrgInfo/treeById?' + 'id=' + postselectinfo.id + '&&' + 'status=' + postselectinfo.status,
    method: 'post',
    data: postselectinfo
  })
}
// 选稿库中 的系统组织树：
export function DorgTree(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  postselectinfo.status = '0'
  return request({
    url: '/zcmtask/zcm/MprLibrarySourceOrg/treeById?' + 'id=' + postselectinfo.id + '&&' + 'status=' + postselectinfo.status,
    method: 'post',
    data: postselectinfo
  })
}
// 系统组织机构树插入
export function orgTreeInsert(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 系统组织机构树检索
export function orgTreeSelect(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 系统组织机构树更新
export function orgTreeUpdate(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgInfo/' + postselectinfo.id,
    method: 'put',
    data: postselectinfo
  })
}
// 系统组织机构树删除
export function orgTreeDelete(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgInfo',
    method: 'DELETE',
    data: postselectinfo
  })
}
// 系统岗位信息检索
export function sysGroupselect(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 系统岗位信息插入
export function sysGroupInsert(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 系统岗位信息更新
export function sysGroupUpdate(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupInfo/' + postselectinfo.id,
    method: 'put',
    data: postselectinfo
  })
}
// 系统岗位信息删除
export function sysGroupDelete(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupInfo',
    method: 'DELETE',
    data: postselectinfo
  })
}
// 查询已经设置的人员
export function selectExistUser(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgAdmin/selectExistUser?' + 'orgId=' + postselectinfo.orgId,
    method: 'post',
    data: postselectinfo
  })
}
// 查询未设置的人员
export function selectNoExistUser(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgAdmin/selectNoExistUser?' + 'orgId=' + postselectinfo.orgId,
    method: 'post',
    data: postselectinfo
  })
}
// 组织机构管理员插入
export function sysOrgAdmin(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgAdmin',
    method: 'post',
    data: postselectinfo
  })
}
// 组织机构管理员删除
export function sysOrgAdminDELETE(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysOrgAdmin/force',
    method: 'DELETE',
    data: postselectinfo
  })
}
// 查询已经设置的岗位人员
export function selectExistGroupUser(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupUser/selectExistUser?' + 'orgId=' + postselectinfo.orgId + '&' + 'groupId=' + postselectinfo.groupId,
    method: 'post',
    data: postselectinfo
  })
}
// 查询未设置的岗位人员
export function selectNoExistGroupUser(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupUser/selectNoExistUser?' + 'orgId=' + postselectinfo.orgId + '&' + 'groupId=' + postselectinfo.groupId,
    method: 'post',
    data: postselectinfo
  })
}
// 岗位人员插入
export function groupUserbatch(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupUser/batch',
    method: 'post',
    data: postselectinfo
  })
}
// 岗位人员删除
export function groupUserForceBatch(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysGroupUser/force/batch',
    method: 'DELETE',
    data: postselectinfo
  })
}
/*
 * 系统管理 end
 * */
/*
 *  云稿库start
 * */
// 云稿库检索
export function yungaoSelect(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/MprLibrarySourceOrg/select',
    method: 'post',
    data: postselectinfo
  })
}
// 云稿库批量插入
export function yungaoUpdate(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: prefix + '/zcm/MprLibrarySourceOrg/batch',
    method: 'post',
    data: postselectinfo
  })
}
/*
 *  云稿库end
 * */
/*
 *  内容撤回 start
 * */
// 获取成品稿件列表信息
export function recallqueryPublicedArticle(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/nrsh/queryPublicedArticleList',
    method: 'post',
    data: postselectinfo
  })
}
// 撤回成品稿件
export function recallProductArticle(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/zcm/nrsh/backProductArticle/' + postselectinfo.articleid + '/' + postselectinfo.userid,
    method: 'post',
    data: postselectinfo
  })
}
// 获取成品稿件详细信息
export function recallqueryPubliced(postselectinfo) {
  return request({
    url: process.env.PREFIX + '/zcm/nrsh/queryPublicedArticle/' + postselectinfo.articleid,
    method: 'post',
    data: postselectinfo
  })
}

// 复合检索
export function codeCompositeSelect(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 码表插入
export function codeInsert(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 码表检索
export function codeSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 码表更新
export function codUpdate(postselectinfo) {
  console.log(postselectinfo)
  console.log(555666)
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo',
    method: 'PUT',
    data: postselectinfo
  })
}
// 码表删除（更改状态）
export function codeDeleteState(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo',
    method: 'DELETE',
    data: postselectinfo
  })
}
// 码表删除（强制）
export function codeDelete(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: systemprefix + '/SysCodeInfo/force',
    method: 'DELETE',
    data: postselectinfo
  })
}

export function sysSettinglist(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'get',
    url: url + '/setting',
    params: postselectinfo
  })
}
// 保存设置数据
export function saveSysSetting(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'POST',
    url: url + '/setting',
    params: postselectinfo
  })
}
/*
*  系统设置接口 end
* */
/*
*  资源管理接口 start
* */
// 功能管理列表
export function fuctionList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'GET',
    url: url + '/fea/list'
  })
}
// -	获取功能信息
export function fetchFuctionList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'GET',
    url: url + '/fea',
    params: postselectinfo
  })
}
// 保存功能信息
export function saveFuctionList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'POST',
    url: url + '/fea',
    params: postselectinfo
  })
}
// -	删除功能信息
export function deleteFuctionList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'DELETE',
    url: url + '/fea',
    params: postselectinfo
  })
}
// -	获取样式列表
export function styleList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: '/zcm/zcm/pkAppStyle/listStyle',
    method: 'post',
    data: {}
  })
}
// -	保存样式信息
export function saveStyleList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    method: 'POST',
    url: '/zcm/zcm/pkAppStyle/addStyle',
    data: postselectinfo
  })
}
// -	修改样式信息
export function updateStyleList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    method: 'POST',
    url: '/zcm/zcm/pkAppStyle/updateStyle',
    data: postselectinfo
  })
}
// -	查询单个样式信息
export function searchStyle(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    method: 'POST',
    url: '/zcm/zcm/pkAppStyle/queryStyle/' + postselectinfo.id,
    data: postselectinfo
  })
}
// -	删除样式
export function deleteStyleList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    method: 'post',
    url: '/zcm/zcm/pkAppStyle/deleteStyle',
    data: postselectinfo
  })
}
// -	获取样式信息
export function fetchStyleList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return axios({
    method: 'GET',
    url: url + '/sty',
    params: postselectinfo
  })
}
/*
*  资源管理接口 end
* */
/*
*  媒体排行榜 start
* */
// 媒体排行榜-报刊接口
export function rankPaper(postselectinfo) {
  // console.log(JSON.stringify(postselectinfo))
  return axios({
    url: baseUrl + '/api/media-rank/paper',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
// 媒体排行榜-网站接口
export function webRank(postselectinfo) {
  // console.log(JSON.stringify(postselectinfo))
  return axios({
    url: baseUrl + '/api/media-rank/web',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
// 媒体排行榜-APP接口
export function appRank(postselectinfo) {
  // console.log(JSON.stringify(postselectinfo))
  return axios({
    url: baseUrl + '/api/media-rank/app',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
// 媒体排行榜-WAP接口
export function wapRank(postselectinfo) {
  // console.log(JSON.stringify(postselectinfo))
  return axios({
    url: baseUrl + '/api/media-rank/wap',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
// 媒体排行榜-微博接口
export function weiboRank(postselectinfo) {
  // console.log(JSON.stringify(postselectinfo))
  return axios({
    url: baseUrl + '/api/media-rank/weibo',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
// 媒体排行榜-微信接口
export function weixinRank(postselectinfo) {
  return axios({
    url: baseUrl + '/api/media-rank/weixin',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
// 媒体排行榜-头条接口
export function toutiaoRank(postselectinfo) {
  // console.log(JSON.stringify(postselectinfo))
  return axios({
    url: baseUrl + '/api/media-rank/toutiao',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data: JSON.stringify(postselectinfo)
  })
}
/*
*  媒体排行榜 end
* */
/*
*  效果分析 start
* */
// 通用接口
// 获取部门
export function getOrgName() {
  return axios({
    url: baseUrl + '/api/article/orgName',
    method: 'get'
  })
}

/* ------------------------------------web begin-------------------------------------*/
// 账户登录锁定解除
export function lockRelease(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/user/accountLockoutRelease/' + postselectinfo.username,
    method: 'post',
    data: postselectinfo
  })
}
// 用户个人信息
export function userInfo(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/user/getUserInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 用户个人信息修改
export function userInfoChange(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/user/changeUserInfo/' + postselectinfo.userid,
    method: 'post',
    data: postselectinfo
  })
}
// 平台登录日志信息
export function logonLogInformation(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysLogonLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台操作日志信息
export function operationInformation(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysOptLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台异常日志信息
export function abnormalInformation(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysExceptionLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台短信发送日志信息
export function smsMessage(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysSmsLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台邮件发送日志信息
export function mailMessage(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysEmailLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 插入
export function addressBookInformationCr(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 条件更新
export function addressBookInformationTjgx(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo',
    method: 'put',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 件数
export function addressBookInformationNum(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/count',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 强制删除
export function addressBookInformationRemove(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/force',
    method: 'delete',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 强制删除(all)
export function addressBookInformationRemoveAll(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/force/batch',
    method: 'delete',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 检索
export function addressBookInformationSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 更新
export function addressBookInformationGx(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/' + postselectinfo.id,
    method: 'put',
    data: postselectinfo.formData
  })
}
// 平台定时任务管理 - 查询任务
export function timingTask(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/queryAllJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 新增任务
export function addTask(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/addJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 修改任务
export function modificationTask(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/updateJob',
    method: 'put',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 单条任务查询
export function singleStrip(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/queryOneJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 删除
export function deleteJob(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/deleteJob',
    method: 'delete',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 恢复
export function resumeJob(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/resumeJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 暂停
export function pauseJob(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/pauseJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 立即执行
export function runJobNow(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/runJobNow',
    method: 'post',
    data: postselectinfo
  })
}
// 码表
export function politicsGetCodeList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysCodeInfo/select',
    method: 'POST',
    data: postselectinfo
  })
}
// 根据站点类型查询站点栏目树------h5ds 开始
export function findModelCategoryTreeByType(postselectinfo) {
  postselectinfo.userId = store.getters.userid
  return request({
    url: '/zcmtask/zcm/appNavigationCategory/findModelCategoryTreeByType' + '?' + 'userId=' + postselectinfo.userId + '&' + 'type=' + postselectinfo.type,
    method: 'post',
    data: postselectinfo
  })
}

export function findTerminalList(postselectinfo) {
  postselectinfo.userId = store.getters.userid
  return request({
    url: '/zcmtask/zcm/appNavigation/findTerminalList' + '?' + 'type=' + postselectinfo.type,
    method: 'post',
    data: postselectinfo
  })
}

export function getArticleList(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  // postselectinfo.userid = '116'
  return request({
    url: 'http://210.73.217.92:8041/zcmtask/zcm/appNavigationCategory/findModelCategoryTreeByType',
    method: 'post',
    data: postselectinfo
  })
}

// 根据站点类型查询站点栏目树------h5ds 结束

// -------------------------------测试demo begin--------------------------------------------
// 创建直播表格数据
export function addLiveTable(postselectinfo) {
  return request({
    url: 'http://192.168.0.5:7300/mock/5c807e76e04e7106ba522011/example/addLiveData',
    method: 'POST',
    data: postselectinfo
  })
}
